<?php
basename($_SERVER["PHP_SELF"]) == 'inc.desk_select.php' && exit('Invalid Access!');

	
	$r_wallet = array(
	$vars['file']['member']['desk'],	
	$vars['file']['member']['volume'],
	$vars['file']['member']['level'],
	$vars['file']['member']['ep_management']);	
	
	$r_wallet_d = array(
	$vars['file']['member']['desk'] => __('Summary'),	
	$vars['file']['member']['volume'] => __('Volume'),
	$vars['file']['member']['level'] => __('Level'),
	$vars['file']['member']['ep_management'] => __('EP Management'));
	
$inc_wallet_select = build_select($r_wallet, $r_wallet_d, $this_file, 'inc_desk_type');
$inc_wallet_select = "<div class='right'>$inc_wallet_select</div>";

ob_start();
?>
<script type='text/javascript' src='<?php echo JS_URL."/get_file_gzip.php?file=".urlencode("jquery.js,jquery.datepicker.js"); ?>'></script>
<script type='text/javascript'>
jQuery(document).ready(function(j){
	j('select[@name=inc_desk_type]').change(function(){
		var file = j('select[@name=inc_desk_type] > option:selected').val();
		window.location = file;
	});
	
	j('#date_from').datepicker({
		changeMonth: true,
		changeYear: true,
		dateFormat: 'yy-mm-dd',
		minDate: new Date(2013,1,1), 
		maxDate: '+1M +10D'
	});

	j('#date_to').datepicker({
		changeMonth: true,
		changeYear: true,
		dateFormat: 'yy-mm-dd',
		minDate: new Date(2009,4,1), 
		maxDate: '+1M +10D'
	});
});
</script>
<?php
$inc_jvscript = ob_get_clean();
?>